home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 1 #6
/
Commodore_Disk_User_Vol.1_6_1988_-.d64
/
colour match
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
79 lines
10 rem ** colour match **
20 rem ** by d.butcher **
30 printchr$(142)chr$(8)
40 poke53280,2:poke53281,2:gosub450
50 dimcm(16,16,3),c$(16),i$(16),b$(16)
60 d=d+1:x=0:forc=0to15:readc$(c),i$(c),cm(16,c,d),b$(c):next
70 forc=0to15:forp=0to15:ifp=cthenr$="0":goto180
80 b=val(b$(p)):poke53280,c:poke53281,c:x=x+1
90 print"[147]"tab(9)chr$(b)"combination number "x""
100 l1=len(c$(p)):l2=len(c$(c)):l=l1+l2
110 printtab(18-l/2)c$(p)" on "c$(c)
120 printtab(12)"please enter mark"
130 printtab(16)"good - 3"
140 printtab(16)"fair - 2"
150 printtab(16)"poor - 1"
160 getr$:ifr$=""then160
170 ifval(r$)<1orval(r$)>3then90
180 r=val(r$):ifr<0orr>3then90
190 ifr=3thencm(c,p,d)=3:goto220
200 ifr=2thencm(c,p,d)=2:goto220
210 ifr=1thencm(c,p,d)=1
220 nextp,c:poke53280,2:poke53281,2
230 print"[147]"tab(3)"[158]do you wish to see marks (y/n) ? ";
240 gosub430:ifr$="n"then300
250 forx=0to15:printtab(8)i$(x)" ";:next:print
260 forc=0to15:printc$(c)"[145]"
270 forp=0to15:printtab(7)cm(c,p,d)"[157]";
280 next:print:next:print
290 ifd=2then330
300 printtab(2)"run again for black + white (y/n) ? ";
310 gosub430:ifr$="n"then330
320 restore:goto60
330 print"do you wish to see total marks (y/n) ? ";
340 gosub430:ifr$="n"then400
350 print"[147]"tab(14)"total marks":forx=0to15:printtab(8)i$(x)" ";:next:print
360 forc=0to15:printc$(c)"[145]"
370 forp=0to15:cm(c,p,3)=cm(c,p,1)+cm(c,p,2)
380 printtab(7)cm(c,p,3)"[157]";
390 next:print:next
400 printtab(11)"run again (y/n) ? ";
410 gosub430:ifr$="n"thenprintchr$(9):end
420 run
430 getr$:ifr$<>"y"andr$<>"n"then430
440 printr$:print:return
450 print"[147][158]"tab(14)"colour match"
460 printtab(14)"[197][197][197][197][197][197][197][197][197][197][197][197]"
470 print"although the c64 offers a wide selection"
480 print"of colours, not every combination of two"
490 print"provides a good match. pairings that are"
500 print"good for graphics use aren't necessarily"
510 print"suitable for displaying text. this is"
520 print"especially noticeable when monochromatic"
530 print"monitors are used. this program can help"
540 print"in the selection of colours when writing"
550 print"basic programs."
560 gosub690
570 print"every combination of two colours will be"
580 print"displayed. you'll be told which colours"
590 print"are being used, and asked to give a mark"
600 print"for each combination. when every pairing"
610 print"has been shown, you can either run again"
620 print"for black & white, (remember to adjust"
630 print"your set), or see the marks displayed on"
640 print"a grid. the colours won't change until"
650 print"you have entered a mark within the range"
660 print"specified."
670 gosub710
680 return
690 y$=""
700 y$=y$+"press return to continue"
710 printy$
720 getan$:ifan$<>chr$(13)then720
730 print"[147]":return
740 datablack,b,0,144,white,w,1,5,red,r,2,28,cyan,c,3,159
750 datapurple,p,4,156,green,g,5,30,blue,b,6,31
760 datayellow,y,7,158,orange,o,8,129,brown,b,9,149
770 datalt.red,r,10,150,gray1,g,11,151,gray2,g,12,152
780 datalt.grn.,g,13,153,lt.blue,b,14,154,gray3,g,15,155